package com.example.demo0310.service.impl;

import com.example.demo0310.entity.Student;
import com.example.demo0310.mapper.StudentMapper;
import com.example.demo0310.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentMapper studentMapper;

    @Override
    public Student findByID(Integer id) {
        return studentMapper.findByID(id);
    }

    @Override
    public Student findByName(String name) {
        return studentMapper.findByName(name);
    }

    @Override
    public List<Student> selectAll() {
        return studentMapper.selectAll();
    }

    @Override
    public Boolean deleteID(int id) {
        return studentMapper.deleteID(id);
    }

    @Override
    public Boolean UpdateID(int id, String name) {
        return studentMapper.UpdateID(id, name);
    }

    @Override
    public Boolean InsertData(int id, String name, int age, double score, String birthday, String insert_time) {
        return studentMapper.InsertData(id, name, age, score, birthday, insert_time);
    }
}
